<template>
  <a-modal :maskClosable="false"
    :title="title"
    :width="1280"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">


      <a-tabs default-active-key="1" >
        <a-tab-pane key="1" tab="回访详情">
          <a-table
            style="margin-top: 10px"
            size="middle"
            bordered
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="loading"
            @change="handleTableChange">
          </a-table>
        </a-tab-pane>
        <a-tab-pane key="2" tab="月结" force-render>
          <a-textarea placeholder="" auto-size style="height: 500px;"/>

        </a-tab-pane>

      </a-tabs>

    </a-spin>
  </a-modal>
</template>

<script>
import { httpAction, putAction, getAction, postAction } from '@api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { pushIfNotExist } from '@/utils/util'
import EmployeeDialog from '@views/his/dialog/EmployeeDialog'

export default {
  name: 'HHisInterviewPlanLogModal',
  mixins: [JeecgListMixin],
  components: {
    EmployeeDialog
  },
  data() {
    return {
      title: '操作',
      visible: false,
      queryParam: { planType: '3' },
      disableMixinCreated: true,
      layout: {
        labelCol: { span: 6 },
        wrapperCol: { span: 14 }
      },
      confirmLoading: false,
      url: {
        list: '/ch/interview/log/list'
      },
      columns: [
        {
          title: '走访人员姓名',
          align: 'center',
          dataIndex: 'eyName',
          width: 130,
        },
        {
          title: '走访时间',
          align: 'center',
          dataIndex: 'createTime',
          width: 180,
        },
        {
          title: '客户状态',
          align: 'center',
          dataIndex: 'mentality',
          width: 180,
        },
        {
          title: '走访记录内容',
          align: 'center',
          dataIndex: 'recordContent',
          width: 150,
        },
        {
          title: '本次走访解决问题方案',
          align: 'center',
          dataIndex: 'solution'
        },
        {
          title: '上次执行解决方案反馈情况',
          align: 'center',
          dataIndex: 'lastRecord'
        }
      ]
    }
  },
  created() {

  },

  methods: {
    view(record) {
      const that = this
      that.visible = true
      that.queryParam.planCode = record.planCode
      that.queryParam.patientId = record.patientId
      that.loadData()
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleOk() {
      const that = this
      that.close()
    },
    handleCancel() {
      this.close()
    }
  }
}
</script>

<style scoped>

</style>